<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
  </head>
  <body>
    <div id="app">
      <p style="font-size: 50px;">{{msg}}</p>
      <p :style="{fontSize: '50px'}">{{msg}}</p>

      <p :style="{fontSize:f50,backgroundColor:bColor}">{{msg}}</p>
      <p :style="getStyle()">{{msg}}</p>
    </div>

    <script src="../js/vue.js"></script>

    <script>
      const app = Vue.createApp({
        data() {
          return {
            msg: "test",
            f50: "50px",
            bColor:"red"
          }
        },
        methods: {
          getStyle(){
            return {fontSize:this.f50, backgroundColor:this.bColor}
          }
        },
      }).mount("#app");
    </script>
  </body>
</html>